<?
$do_not_validate = 0; //take this out when live

if (empty($do_not_redirect)) {
    if (empty($_SESSION['login_id'])) {
        header("Location:index.php");
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title><?= FACEBOOK_APP_NAME ?></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
        <meta name="title" content="<?= FACEBOOK_APP_NAME ?>" />
        <meta name="description" content="<?= FACEBOOK_APP_DESCRIPTION ?>" />
        <meta property="og:title" content="<?= FACEBOOK_APP_NAME ?>" />
        <meta property="og:description" content="<?= FACEBOOK_APP_DESCRIPTION ?>" />
        <meta property="og:image" content="<?= SOURCE_URL_HTTP ?>/images/logo.gif"/>
        <meta property="og:site_name" content="<?= FACEBOOK_APP_NAME ?>"/>
        <meta property="og:caption" content="Caption here"/>
        <meta property="fb:app_id" content="<?= trim(FACEBOOK_APP_ID) ?>" />
        <link href="includes/css/general_style.css" rel="stylesheet" type="text/css">
        <link href="includes/css/jquery-ui-1.8.11.custom.css" rel="stylesheet" type="text/css" >

        <script type="text/javascript" src="includes/js/jquery-1.6.min.js"></script>
        <script type="text/javascript" src="includes/js/common_javascript.js"></script>
        <script type="text/javascript" src="includes/js/jquery-ui-1.8.11.custom.min.js"></script>

        <script src="includes/js/jquery.colorbox.js"></script>
        <link media="screen" rel="stylesheet" href="includes/css/colorbox.css" />

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-29717792-1']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

    </head>
    <body>

        <?
        if (SANDBOX_MODE == 0) {
            ?>
            <div id="fb-root"></div>

            <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
           
            <script type="text/javascript">
                FB.init({
                    appId  : '<?= FACEBOOK_APP_ID ?>',
                    status : true, // check login status
                    cookie : true, // enable cookies to allow the server to access the session
                    xfbml  : true,  // parse XFBML
                    oauth  : true // enable OAuth 2.0
                });
                                                
                function increaseIframeSize(w,h){
                                                                                                      
                    var obj =   new Object;
                    obj.width=w;
                    obj.height=h;
                    FB.Canvas.setSize(obj);
                }
                                                                                                    
                                               
                                                                                                	
                FB.Canvas.scrollTo(0,0);
                                                                
    <?
    if (empty($preset_height)) {
        $height = '1300';
    } else {
        $height = $preset_height;
    }
    ?>
        increaseIframeSize(1200,<?= $height ?>);
                                                
                                           
            </script>

        <? } ?>
        <? include_once 'includes/javascript.php'; ?>        
        <div id="divMsg"></div>
    <center>
        <? ?>

        <table width="800">
            <td>
                <table  cellpadding="5" cellspacing="0" align="">
                    <Td align="left"><img src="images/share.png"></td>

                    <td> 
                        <a href="javascript:share_twitter()"><img src="images/btn_twitter.png" style="float:right;margin-right: 2px" border="0"></a>                                        
                        <a href="javascript:streamPublishApp('Share Contents', '<?= str_replace("'", "\\'", FACEBOOK_APP_NAME) ?>', '<?= FACEBOOK_PAGE_TAB_URL ?>', '')" >
                            <img src="images/btn_facebook.png" style="float:right;margin-right: 2px" border="0"></a></td>
                </table>
            </td>
            <Tr>
                <td>

